<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

Route::group(['prefix' => 'v1'],function (){
    Route::group(['namespace' => 'User','prefix' => 'user'],function(){

        //上传图片
        Route::post('upload_img','IndexController@upload_img');

        //测试登录
        Route::post('test_login','LoginController@test_login');
        //微信登录
        Route::post('weixin','LoginController@weixin');
        //轮播
        Route::post('banner','LoginController@banner');
        //手机验证码
        Route::post('phone_code','LoginController@phone_code');
        //手机号码+微信授权注册
        Route::post('weixin_recharge','LoginController@weixin_recharge');
        //短信修改密码
        Route::post('edit_password','LoginController@edit_password');
        //注册协议
        Route::post('gvrp','LoginController@gvrp');
        //修改手机号码
        Route::post('edit_phone','LoginController@edit_phone');

        //首页模块
        //获取线路类型
        Route::post('line','IndexController@line');
        //获取地区
        Route::post('address','IndexController@address');
        //首页设置
        Route::post('index_set','IndexController@index_set');
        //百科
        Route::post('get_encyclopedias','IndexController@get_encyclopedias');
        Route::post('encyclopedias_info','IndexController@encyclopedias_info');
        //常见问题列表
        Route::post('get_problem','IndexController@get_problem');
        Route::post('problem_info','IndexController@problem_info');
        //热线
        Route::post('hot_phone','IndexController@hot_phone');
        //关于我们
        Route::post('about_us','IndexController@about_us');

        //研学线路
        Route::post('research_line','ResearchLineController@research_line');
        //线路详情
        Route::post('research_line_info','ResearchLineController@research_line_info');

        //新闻
        Route::post('news','NewsController@news');
        //新闻详情
        Route::post('news_info','NewsController@news_info');

        //研学工具箱
        Route::post('tool_cabinet','ToolCabinetController@tool_cabinet');

        //登记
        Route::post('add_order','OrderController@add_order');
        //我的订单
        Route::post('my_order','OrderController@my_order');
        //订单详情
        Route::post('order_info','OrderController@order_info');

        //发布心得
        Route::post('add_experience','ExperienceController@add_experience');
        //我的心得
        Route::post('my_experience','ExperienceController@my_experience');
        //心得列表
        Route::post('experience_list','ExperienceController@experience_list');
        //心得详情
        Route::post('experience_info','ExperienceController@experience_info');
        //删除心得
        Route::post('del_my_experience','ExperienceController@del_my_experience');

        //签到
        Route::post('sign','SignController@sign');
        //获取当月
        Route::post('my_sign','SignController@my_sign');

        //修改个人信息
        Route::post('edit_user','UserController@edit_user');
        //用户信息
        Route::post('get_user','UserController@get_user');
        //认证
        Route::post('edit_user_attestation','UserController@edit_user_attestation');
        //退出登录
        Route::post('out_login','UserController@out_login');

        //我的发布留言
        Route::post('my_message','LeavingMessageController@my_message');
        //发布留言
        Route::post('add_message','LeavingMessageController@add_message');

        //商品评论内容
        Route::post('comment','CommentController@comment');
        //发布病例
        Route::post('add_comment','CommentController@add_comment');
        //删除评论
        Route::post('del_comment','CommentController@del_comment');

    });
});